package com.cnpc.fyviewlibrary.view;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.GridView;

/**
 * Created by songzhiiyn on 2017-07-31.
 * 自定义lGridView，用于解决和Scrollview的嵌套时，GridView显示不全
 */

public class GridScrollview extends GridView {
    public GridScrollview(Context context) {
        super(context);
    }

    public GridScrollview(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public GridScrollview(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }
    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        // TODO Auto-generated method stub
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
                MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }
}
